/*
 * MainEntryPoint.java
 *
 * Created on 2 décembre 2008, 12:42
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.projetjava.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.*;

/**
 *
 * @author Olivier
 */
public class MainEntryPoint implements EntryPoint
{

    /** Creates a new instance of MainEntryPoint */
    public MainEntryPoint() {
    }
    
    /**
     * The entry point method, called automatically by loading a module
     * that declares an implementing class as an entry-point
     */
    public void onModuleLoad()
    {
        Header header = new Header();
        //Menu menu = new Menu();
        AffichageCentral affichageCentral = new AffichageCentral();
        MenuClient menuClient = new MenuClient();
        MenuPanier menuPanier = new MenuPanier();

        HorizontalPanel hp = new HorizontalPanel();
        hp.add(menuClient);
        hp.setCellWidth(menuClient, "10%");
        hp.add(affichageCentral);
        hp.setCellWidth(affichageCentral, "80%");
        hp.setCellHorizontalAlignment(affichageCentral, HorizontalPanel.ALIGN_CENTER);
        hp.add(menuPanier);
        hp.setCellWidth(menuPanier, "10%");

        DockPanel panel = new DockPanel();
        panel.add(header, DockPanel.NORTH);
        panel.setCellHorizontalAlignment(header, HorizontalPanel.ALIGN_CENTER);
        //panel.add(menu, DockPanel.NORTH);
        //panel.setCellHorizontalAlignment(menu, HorizontalPanel.ALIGN_CENTER);

        panel.add(hp, DockPanel.CENTER);
        panel.setWidth("100%");

        RootPanel.get().add(panel);
        
    }
    
}